package com.tg.paw.pms.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.tg.paw.common.entity.BaseEntity;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import lombok.NoArgsConstructor;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 * <p>
 * 商品SPU
 * </p>
 *
 * @author Rubble
 * @since 2020-08-05
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("pms_goods")
@ApiModel(value="Goods对象", description="商品SPU")
public class Goods extends BaseEntity {


    @ApiModelProperty(value = "主键")
    @TableId(value = "goods_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using= ToStringSerializer.class)
    private Long goodsId;

    @ApiModelProperty(value = "类目id")
    @TableField("category_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long categoryId;

    @ApiModelProperty(value = "类目名称")
    @TableField("category_name")
    private String categoryName;

    @ApiModelProperty(value = "品牌id")
    @TableField("brand_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long brandId;

    @ApiModelProperty(value = "品牌名称")
    @TableField("brand_name")
    private String brandName;

    @ApiModelProperty(value = "1 新品 2 二手 3 预售")
    @TableField("goods_type")
    private Integer goodsType;

    @ApiModelProperty(value = "商品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty(value = "平台货品编码spu")
    @TableField("goods_no")
    private String goodsNo;

    @ApiModelProperty(value = "商家商品货号")
    @TableField("merch_goods_serial")
    private String merchGoodsSerial;

    @ApiModelProperty(value = "店铺id")
    @TableField("store_id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long storeId;

    @ApiModelProperty(value = "店铺名称")
    @TableField("store_name")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long storeName;

    @ApiModelProperty(value = "销售属性级别 0 无 1 一级 2 二级")
    @TableField("sell_attr_level")
    private Integer sellAttrLevel;

    @ApiModelProperty(value = "市场价")
    @TableField("market_price")
    private BigDecimal marketPrice;

    @ApiModelProperty(value = "标签")
    @TableField("tags")
    private String tags;

    @ApiModelProperty(value = "详情pc")
    @TableField("detail_pc")
    private String detailPc;

    @ApiModelProperty(value = "详情mobile")
    @TableField("detail_mobile")
    private String detailMobile;

    @ApiModelProperty(value = "上架时间")
    @TableField("show_time")
    private Date showTime;

    @ApiModelProperty(value = "下架时间")
    @TableField("off_time")
    private Date offTime;

    @ApiModelProperty(value = "运费模板 0 免邮")
    @TableField("shipping_template")
    private Integer shippingTemplate;

    @ApiModelProperty(value = "备注")
    @TableField("note")
    private String note;

    @ApiModelProperty(value = "审核状态：0 待审核 1 通过 2 拒绝")
    @TableField("audit_statue")
    private Integer auditStatue;

    @ApiModelProperty(value = "审核员")
    @TableField("auditor")
    private String auditor;

    @ApiModelProperty(value = "逻辑删除: 0 正常 1 删除")
    @TableField("delete_status")
    @TableLogic
    private Integer deleteStatus;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "创建者")
    @TableField(value = "creator", fill = FieldFill.INSERT)
    private String creator;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "修改者")
    @TableField(value = "modifier", fill = FieldFill.UPDATE)
    private String modifier;


}
